#ifndef __HIKARI_CameraScript___FILE__DEFINED
#define __HIKARI_CameraScript___FILE__DEFINED

#include "hikari.h"

class CameraScript:public BaseHikariScript{
public:
     
	virtual void sceneLoaded(HObj*object, HikariContext*context){
	
	}

	virtual void update(HObj*object, HikariContext*context){
		if(context->getInput()->IsKeyDown(irr::KEY_UP)){
			object->moveZ(1);
		}
		if(context->getInput()->IsKeyDown(irr::KEY_DOWN)){
			object->moveZ(-1);
		}
		if(context->getInput()->IsKeyDown(irr::KEY_LEFT)){
			object->setRotation(object->getRotation()+vector3df(0,-1,0));
		}

		if(context->getInput()->IsKeyDown(irr::KEY_RIGHT)){
			object->setRotation(object->getRotation()+vector3df(0,1,0));
		}

		if(context->getInput()->IsKeyPressed(irr::KEY_RETURN)){
			HObj*obj=context->getObject(L"toMove");
			obj->moveY(5);
		}
	}

	IMPLEMENT_RTTI(CameraScript, BaseHikariScript);
};
BEGIN_REFLECTION_METADATA(CameraScript, base_rtti_object)
END_REFLECTION_METADATA(CameraScript)
#endif